<?php
function del_deal($fid){
	$GLOBALS["DB"]->execute("DELETE FROM ids_deal WHERE fid=$fid");
	$GLOBALS["DB"]->execute("DROP EVENT IF EXISTS ids_deal_s_$fid");
	$GLOBALS["DB"]->execute("DROP EVENT IF EXISTS ids_deal_e_$fid");
	$GLOBALS["DB"]->execute("DROP EVENT IF EXISTS ids_deal_l_$fid");
	$GLOBALS["DB"]->execute("DELETE FROM memory_event WHERE event_id=$fid");
}